use regex::Regex;
use rpc::{ChannelId, RpcContext};
use crate::connection_manager::server_connection::RpcServerChannel;

pub mod router_service;
pub mod connection_manager;
pub mod server;
pub mod rpc_config;
mod station;

pub fn build_channel(connect_id: u32, context: &RpcContext) -> RpcServerChannel {
    RpcServerChannel::new(ChannelId::new(connect_id), context.sender())
}

pub fn match_express(expression: &str, str: &str)-> bool {
    let re = Regex::new(expression).unwrap();
    re.is_match(str)
}